#include <iostream>
using namespace std;
int main()
{
    unsigned int v;
    cin >> v;
    cout<<hex<<v<<endl;
    unsigned char * p =(unsigned char *) &v;
    int i = 0;
    for(; i<3; i++)
        cout<<hex<<(int)(*(p+i))<<" ";
    cout<<hex<<(int)(*(p+i));
}